package com.lxh.lxhcrm.model.mappers.funTy;

import com.lxh.lxhcrm.model.pojos.Function;

import com.lxh.lxhcrm.model.pojos.FunctionType;
import com.lxh.lxhcrm.model.pojos.Position;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface FunTyMapper {
    /*根据权限组id查询 所有的权限*/
    public List<Function> findFunByFunTyId(@Param("funTyName")String funTypeName);
    /*根据职位id 查询 该权限组已被选的权限*/
    public List<Integer> findFunByPostId(@Param("postId") Integer positionId,@Param("funTyName") String funTypeName);

    public List<FunctionType> funMenu(@Param("empId") Integer empId ,@Param("positionId") Integer positionId);
    /*根据前台传过来的员工id查询部门id*/
    public Integer findDeptId(@Param("empId") Integer empId);
    /*根据前台传来的员工id查询职位id*/
     public Integer findPoId(@Param("empId") Integer empId);
     /*查询是否有修改权限组权限*/
     public List<String> checkFunTy(@Param("empId") Integer empId);
     /*修改权限  只能一个一个权限组修改 不能批量*/
public List<Function> EditFuns(@Param("positionId") Integer positionId, @Param("FunTyName") String funTypeName);
}
